package cn.edu.scau.cmi.liguanwu.abstractFactory;

import java.net.URL;
import java.util.ResourceBundle;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;

public class Controller {
	@FXML
	private TextField textfield1;
	@FXML
	private TextField textfield2;
	@FXML
	private TextArea textarea;
	@FXML
	private Button button;
	public void initialize(URL location, ResourceBundle resources) {
	}
	public void onClick(ActionEvent event) {
		String b = textfield1.getText();
		String m = textfield2.getText();
		MEAT bf = MEAT.getmeattype(m);
		if(b.equals("wens")) {
			Wens w = bf.getWens();
			textarea.setText(w.getW());
		}
		else if(b.equals("tianbang")) {
			Tianbang t = bf.getTianbang();
			textarea.setText(t.getT());
		}
		else if(b.equals("aonong")) {
			Aonong a = bf.getAonong();
			textarea.setText(a.getA());
		}
	}
}
